Skip to content

ci: harden workflows with pinned actions and least-privilege permissions - #187

Open
ahmed-tarek-salem wants to merge 7 commits into
mainfrom
ci/harden-workflows
Open

ci: harden workflows with pinned actions and least-privilege permissions#187
ahmed-tarek-salem wants to merge 7 commits into
mainfrom
ci/harden-workflows

Conversation

@ahmed-tarek-salem

@ahmed-tarek-salem ahmed-tarek-salem commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Security hardening

  • All third-party actions pinned to commit SHAs
  • Least-privilege permissions ({} by default, per-job grants) across commitlint / lint-pr / deploy / refresh-smart-contracts
  • concurrency guards added to commitlint / deploy / refresh-smart-contracts
  • ${{ }} expressions moved out of run: into env:
  • FTP deploys now use protocol: ftps (the action defaults to plaintext FTP, so credentials were crossing the wire in the clear)

Release automation: semantic-release → release-please

  • semantic-release, its 7 devDependencies and .releaserc removed; release-please config + manifests added, seeded at the current 1.28.0
  • Releases are now PR-based: release-please opens a chore(release): X.Y.Z PR that a human reviews and merges
  • Uses the shared GitHub App token (RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY), scoped to contents + pull-requests. No SSH deploy key, no ruleset bypass.
  • Unlike explorer-frontend, the staging rc PR is not auto-merged: the "PR for main, staging and dev" ruleset requires an approving review on staging, and granting the App a bypass would give a workflow-mintable token unreviewed push access.

Gated production deploys

  • deploy.yml now handles dev / staging only
  • Production deploys from release-please.yml, only when a stable release is actually cut (release_created == 'true'), behind the production environment (required reviewers + prevent self-review), so an rc can never reach production

Comment thread .github/workflows/deploy.yml Fixed
Comment thread .github/workflows/validate-data.yml Fixed
Comment thread .github/workflows/validate-data.yml Fixed
Comment thread .github/workflows/validate-data.yml Fixed
ahmed-tarek-salem and others added 3 commits August 13, 2026 03:26
The dev/staging ruleset now lets the qubic-release-bot App bypass the PR
review requirement (bypass_mode: pull_request), so the staging rc release
PR can be merged hands-free. main stays human-gated (classic protection,
no App bypass), so production is unaffected.

Adds the auto-merge step and updates the comment that previously said
staging was human-merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants